package pro.spring.inter;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import pro.spring.model.Udiscuss;

public interface UdiscussMapper {
    int deleteByPrimaryKey(Integer dsId);
    
    //del xianxia
    int deleteByXianxia(@Param("drId")Integer drId,@Param("uId")Integer uId);

    int insert(Udiscuss record);

    int insertSelective(Udiscuss record);

    Udiscuss selectByPrimaryKey(Integer dsId);

    int updateByPrimaryKeySelective(Udiscuss record);

    int updateByPrimaryKey(Udiscuss record);
    
    //得到总条数
    Integer selectCount();
    
    //线下交流   某个活动的参与人数
    List<Udiscuss> selectOneXianUser(@Param("drId")Integer drId);
    
    //by Id
    Integer selectCountBydrId(@Param("drId")Integer drId);
    
    //分页查询
    List<Udiscuss> selectListPage(@Param("offset")Integer offset,@Param("pagesize")Integer pagesize);
    
    //正序
    List<Udiscuss> selectBydrId(@Param("drId")Integer drId,@Param("offset")Integer offset,@Param("pagesize")Integer pagesize);
    
    //倒序desc
    List<Udiscuss> selectBydrIddesc(@Param("drId")Integer drId,@Param("offset")Integer offset,@Param("pagesize")Integer pagesize);
    
}